<?php
namespace App\Services\Agent;

use App\Services\ProjectValidate;
/**
 * @Author: Marte
 * @Date:   2017-05-27 16:25:13
 * @Last Modified by:   ws
 * @Last Modified time: 2018-06-12 10:16
 */
class ValidateAgent extends ProjectValidate
{
    /**
     * 自定义子类初始化
     * @param array $initData
     * @return mixed
     */
    public function initValidate($initData = [])
    {

    }
    public $rules = [
        'agent_type'   => 'required',
        'full_name'    => 'required|unique:agent,full_name',
        'simple_name'  => 'required|unique:agent,simple_name',
        'phone_name'   => 'required',
        'card_type'        => 'required',
        'phone' => 'required|unique:agent,phone',
        'card' => 'required|unique:agent,card',
        'email' => 'required|unique:agent,email',
        'scale'      => 'required',
//        'protocol_file'   => 'required',
//        'record_file'    => 'required',
        'main'      => 'required',
        'payee_name'  => 'required',
        'band_card'          => 'required',
        'band_info'      => 'required',
        'weixin' => 'unique:agent,wei_xin',
        'weibo' => 'unique:agent,wei_bo',
    ];


    public $messages = [
       
    ];

    /**
     * @var array 上面规则中定义的 key 的名字
     */
    public $attributes = [
         'agent_type' => '代理性质',
         'full_name' => '代理全称',
         'simple_name' => '代理简称',
        'phone_name' => '联系人',
        'card_type' => '证件种类',
        'card' => '证件号',
        'phone' => '移动电话',
        'scale' => '分比',
        'protocol_file' => '协议档案',
        'record_file' => '档案备案',
        'country' => '国家',
        'payee_name' => '收款人姓名',
        'band_card' => '银行卡卡号',
        'band_info' => '开户行信息',
        'weibo' => '微博',
    ];
}